<template>
  <div>
    <div class="title">
      <h4>{{presents.title}}</h4>
      <hr>
    </div>
    <div class="main"></div>
  </div>
</template>
           
<script>
import { shopdetailsget } from "@/api";

export default {
  data() {
    return {
      presents: {
        title: "",
        content: ""
      }
    };
  },
  methods: {
    async getdetail(id) {
      var res = await shopdetailsget(id);
      this.presents.title = res.data.message[0].title;
      this.presents.content = res.data.message[0].content;
      var main = document.querySelector(".main");
      main.innerHTML = this.presents.content;
    }
  },
  created() {
    this.getdetail(this.$route.params.id);
  }
};
</script>
<style scoped lang=less>
.title {
  text-align: center;
  color: rgb(91, 106, 255);
}
.main {
  overflow: hidden;
  padding: 5px;
  img {
    width: 100%;
  }
}
</style>